package com.meta.metatest.controller;

import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/default")
@Api(tags = "默认接口 api")
public class DefaultController {

    @ApiImplicitParam(name = "param", value = "参数", required = false)
    @ApiOperation(value  = "普通 test 请求")
    @PostMapping("/")
    public String test(@RequestParam(required = false) String param) {
        if (StrUtil.isBlankIfStr(param)) {
            return "您未输入任何值";
        }
        return "您输入的值为：" + param;
    }

}
